home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13954 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  39 lines

  1. Newsgroups: comp.lang.c++
  2. Path: news.dtc.hp.com!hplntx!hplabs!hplextra!hplb!hppwd!news
  3. From: Martin Wink <martin@hpopd.pwd.hp.com>
  4. Subject: iostream and multibyte data
  5. Sender: news@hpopd.pwd.hp.com (C-News owner c/o Richi)
  6. Message-ID: <315880D9.3E01@hpopd.pwd.hp.com>
  7. Date: Tue, 26 Mar 1996 23:42:17 GMT
  8. Content-Transfer-Encoding: 7bit
  9. Content-Type: text/plain; charset=us-ascii
  10. Nntp-Posting-Host: hppwdk83.pwd.hp.com
  11. Mime-Version: 1.0
  12. X-Mailer: Mozilla 2.0 (WinNT; I)
  13. Organization: Hewlett-Packard EMO Pinewood, UK
  14.  
  15. Can anyone suggest pointers to information on how to use the 
  16. standard iostream classes with Multibyte data, such as 
  17. Shift-JIS?
  18.  
  19. I use MSVC & MFC, so I've tried searching on MSDN, but without 
  20. success.
  21.  
  22. The issue as I see it is that the iostream only ever deals with 
  23. single byte characters, and so at a higher level there needs to 
  24. be code which detects whether a lead byte has been read, and to 
  25. deal with the next byte accordingly.
  26.  
  27. My gut feeling is that it should be possible to sub-class the 
  28. iostream classes to do centralize the extra work, but would love 
  29. to hear that it's been successfully done before before trying to 
  30. reinvent it myself.
  31.  
  32. From the fact that the source code deals with 'char' types, I 
  33. guess a similar but slightly simpler issue exists for Unicode as 
  34. well, but it surprises me that I haven't heard the problem 
  35. raised before.
  36.  
  37. regards..............................
  38.    Martin Wink, HP-EMO, Pinewood, UK.
  39.